package com.cortex.papayasearch;

import java.util.ArrayList;
import java.util.HashMap;
import java.util.Iterator;
import java.util.List;
import java.util.Set;

public class HelpData {

	private List<Page> pages;
	private boolean isSkipAll = false;
	
	public HelpData(){
		pages = new ArrayList<Page>();
		addPage(0,R.drawable.help_view1_screen1,R.drawable.help_view1_screen2);
		addPage(1,R.drawable.help_view2_screen1);
		addPage(2,R.drawable.help_view3_screen1,R.drawable.help_view3_screen2);
		addPage(3,R.drawable.help_view4_screen1);
	}
	public void setSkipAll(boolean isSkipAll) {
		this.isSkipAll = isSkipAll;
	}
	public boolean isSkipAll() {
		return isSkipAll;
	}
	public List<Page> getPages() {
		return pages;
	}
	public void setPages(List<Page> pages) {
		this.pages = pages;
	}
	public void addPage(int page,boolean isDisplayed,int... views){
		pages.add(new Page(page,views, isDisplayed));
	}
	public void addPage(int page ,int... views){
		pages.add(new Page(page,views, false));
	}
	public void removePage(int page){
		pages.remove(page);
	}
	public Page getPage(int index){
		return pages.get(index);
	}
	public void setPageDisplayed(int page,boolean isDisplayed){
		pages.get(page).setDisplayed(isDisplayed);
	}
	public class Page{
		private int[] views;
		private int page;
		private boolean isDisplayed;
		
		public Page(int page,int[] views,boolean isDisplayed){
			this.page = page;
			this.views = views;
			this.isDisplayed = isDisplayed;
		}
		public Page(int page,int[] views){
			this.page = page;
			this.views = views;
			this.isDisplayed = false;
		}
		public int[] getViews() {
			return views;
		}
		public void setViews(int[] views) {
			this.views = views;
		}
		public int getPage() {
			return page;
		}
		public void setPage(int page) {
			this.page = page;
		}
		public boolean isDisplayed() {
			return isDisplayed;
		}
		public void setDisplayed(boolean isDisplayed) {
			this.isDisplayed = isDisplayed;
		}
		
	}
	
}
